<template>
  <div class="bg_friend">
    <div class="bg_phone">
      <el-scrollbar class="friend_con">
        <div class="content">
          <div class="bg_top">
            <div class="autor">
              <span class="avar_name">张三</span>
              <img class="avator" src="/static/friend.png" alt="" />
            </div>
          </div>
          <div class="other_con">
            <div class="firend_status" v-for="(item, index) in list" :key="index">
              <img class="avator_img" src="/static/friend.png" alt="" />
              <div class="firend_r_con">
                <div class="friend_name">{{ item.name }}</div>
                <div class="friend_title" v-if="item.type == 'pic'">{{ item.title }}</div>
                <div class="friend_main_con" v-if="item.type == 'link'">
                  <img class="friend_icon" :src="item.content.icon" alt="" />
                  <div class="friend_desc">{{ item.content.desc }}</div>
                </div>
                <div v-if="item.type == 'pic'" class="friend_pic_box">
                  <template v-if="item.content.pic.length == 1">
                    <img class="big_image" :src="item.content.pic[0].url" alt="" />
                  </template>
                  <template v-else>
                    <img
                      class="small_image"
                      :src="img.url"
                      alt=""
                      v-for="(img, index) in item.content.pic"
                      :key="index"
                    />
                  </template>
                </div>
              </div>
            </div>
          </div>
        </div>
      </el-scrollbar>
    </div>
  </div>
</template>
<script lang="ts" setup>
import { reactive, ref } from "vue";
const props = defineProps(["FriendDetail"]);
const list = reactive([]);
</script>

<style scoped lang="scss">
.bg_friend {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  .bg_phone {
    background: #fff url("/static/bg_phone.png");
    background-size: cover;
    width: 244px;
    height: 495px;
    box-sizing: border-box;
    overflow: hidden;
    // box-shadow: 0px 0.5px 10px rgb(0 0 0 / 20%);
    .friend_con {
      margin: 8px auto;
      width: 225px;
      height: 469px;
      overflow: hidden;
      border-radius: 30px;
      .bg_top {
        width: 100%;
        height: 183px;
        background: url("/static/app/tm.png");
        background-size: cover;
        position: relative;
        .autor {
          position: absolute;
          right: 6px;
          bottom: -10px;
          .avator {
            width: 37px;
            margin-left: 2px;
          }
          .avar_name {
            margin-top: 8px;
            float: left;
            font-size: 12px;
            font-family: STHeitiSC-Medium, STHeitiSC;
            font-weight: 500;
            color: #ffffff;
          }
        }
      }
      .other_con {
        margin: 10px;
        .firend_status {
          display: flex;
          margin-bottom: 10px;
          .avator_img {
            width: 27px;
            height: 27px;
            margin-right: 4px;
          }
          .firend_r_con {
            .friend_name {
              font-size: 12px;
              font-family: STHeitiSC-Medium, STHeitiSC;
              font-weight: 500;
              color: #586b95;
              transform: scale(0.83);
              transform-origin: left top;
              // zoom: 0.83;
            }
            .friend_title {
              margin-top: 4px;
              font-size: 12px;
              font-family: STHeitiSC-Medium, STHeitiSC;
              font-weight: 500;
              color: #586b95;
              // zoom: 0.83;
              transform: scale(0.83);
              transform-origin: left top;
            }
            .friend_main_con {
              display: flex;
              margin-top: 6px;
              padding: 4px;
              background: #f9f9f9;
              .friend_icon {
                width: 22px;
                height: 22px;
                margin-right: 4px;
              }
              .friend_desc {
                font-size: 12px;
                font-family: STHeitiSC-Medium, STHeitiSC;
                font-weight: 500;
                color: #586b95;
                line-height: 12px;
                // zoom: 0.83;
                transform: scale(0.83);
                transform-origin: left top;
              }
              &:hover {
                background: #fff5f2;
              }
            }
            .big_image {
              max-width: 120px;
              max-height: 90px;
            }
            .small_image {
              width: 46px;
              height: 46px;
              margin-right: 2px;
              margin-bottom: 1px;
            }
          }
        }
      }
    }
  }
}
</style>
